Repository navigation
feat: add built-in Python 3 Language plugin with calibrated Reference ranges - #157
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the built-in Python 3 Language plugin (
plugins/languages/python, cratecodeint-lang-python, plugin namepython), register it incrates/cliandcrates/plugin-hostSeam 2 conformance tests, calibrate Python's Reference ranges across 20 pre-2023 public Python repositories (ADR 0013), and update all user-facing documentation.Closes #154
Closes #155
Closes #156
Tier
Tier 3 from the tier check:
crates/plugin-host/Cargo.tomlandcrates/plugin-host/tests/conformance.rsmatchcrates/plugin-host/**, andcrates/cli/tests/check.rsupdates two existing tests that previously usedpythonas an unknown language plugin.Task
Spec #154 and Tickets #155 and #156:
codeint-lang-pythonin safe Rust (#![forbid(unsafe_code)]) targeting the modern Python 3 superset (rejecting incompatible Python 2 syntax such asprint '...'and<>as unparsable)..pyfiles only, classifyTest/Generated/ProductionSource sets, and discoverpyproject.toml([tool.uv.workspace].members) Workspace packages.if TYPE_CHECKING:imports from runtime Import cycles and resolve relative, root, andsrc/-layout imports.conditional-yields-boolean,else-after-return,except-only-reraises,if-else-returns-boolean,trailing-bare-return).pythonintocrates/cliandcrates/plugin-hostSeam 2 conformance tests.docs/adr/0013-python-reference-ranges.md, wire calibrated Reference ranges, and update docs (README.md,docs/guide/*,docs/reference.md,llms.txt).Fail-first test
crates/plugin-host/tests/conformance.rs::built_in_python_plugin_passes_seam_2_conformancepython: expected erosion reference rangebefore wiring the calibrated Reference ranges fromADR 0013.6 passed; 0 failedacross all built-in and Wasm conformance tests).Checks
cargo clippy --workspace --all-targets -- -D warningscargo test --workspace --lockedcargo run --package xtask -- merged-resultcargo run --package codeint-cli -- diff origin/mainlinks,secrets,duplicates,format,repository,markdown,message)Safety proof
codeint-lang-pythoncompiles with#![forbid(unsafe_code)], performs zero filesystem/network I/O, never panics on malformed or Python 2 input, and leaves existing language plugins and the Wasm plugin host runtime untouched.cargo test --package codeint-lang-python,cargo test --package codeint-plugin-host --test conformance, andcargo test --workspace --lockedall passed; the release binary measured 20 public Python repositories (3.5M+ Production lines includinghome-assistant/core,huggingface/transformers,pytorch/pytorch,django/django,python/cpython) in 4.40s total with 0 panics and 0 unparsable files.interrogate: verified via Seam 2 conformance tests, Python 2 rejection tests, malformed/unterminated string tests, and 20 real-world Python repositories.Runtime evidence
a282ce4(release build on Apple Silicon)codeint checkon 20 pre-2023 public Python repositories (docs/adr/0013-python-reference-ranges.md):django/django(116,838 Prod lines in0.33s),home-assistant/core(671,942 Prod lines in0.73s),huggingface/transformers(580,324 Prod lines in0.85s),python/cpython(291,724 Prod lines in0.46s), 0 unparsable files across the full 20-repository panel.Gaps